home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Prog / T / Think-Pascal-7.0.cpt / THINK Pascal Interfaces / CTBUtilities.p < prev    next >
Encoding:
Text File  |  1991-04-05  |  2.9 KB  |  141 lines  |  [TEXT/PJMM]

  1. {    This file has been processed by The THINK Pascal Source Converter, v1.1.    }
  2.  
  3. {}
  4. {    CTBUtilities.p}
  5. {    Pascal Interface to the Communications Toolbox Utilities}
  6. {    }
  7. {    Copyright © Apple Computer, Inc. 1988-90}
  8. {    All rights reserved}
  9. {}
  10. {$IFC UNDEFINED UsingIncludes}
  11. {$SETC UsingIncludes := 0}
  12. {$ENDC}
  13.  
  14.  
  15. unit CTBUtilities;
  16. interface
  17.     uses
  18.         Types, OSUtils, Memory, Script, Packages, AppleTalk, Dialogs;
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.     const
  42. { version of the Comm Toolbox Utilities }
  43.         curCTBUVersion = 2;
  44.  
  45. { CTBUErr}
  46.         ctbuGenericError = -1;
  47.         ctbuNoErr = 0;
  48.  
  49. { DITLMethod }
  50.         overlayDITL = 0;
  51.         appendDITLRight = 1;
  52.         appendDITLBottom = 2;
  53.  
  54. { Choose responses }
  55.         chooseDisaster = -2;
  56.         chooseFailed = -1;
  57.         chooseAborted = 0;
  58.         chooseOKMinor = 1;
  59.         chooseOKMajor = 2;
  60.         chooseCancel = 3;
  61.  
  62. { NuLookup responses }
  63.         nlOk = 0;
  64.         nlCancel = 1;
  65.         nlEject = 2;
  66.  
  67. { Name FilterProc responses }
  68.         nameInclude = 1;
  69.         nameDisable = 2;
  70.         nameReject = 3;
  71.  
  72. { Zone FilterProc responses }
  73.         zoneInclude = 1;
  74.         zoneDisable = 2;
  75.         zoneReject = 3;
  76.  
  77. { Dialog items for hook procedure }
  78.         hookOK = 1;
  79.         hookCancel = 2;
  80.         hookOutline = 3;
  81.         hookTitle = 4;
  82.         hookItemList = 5;
  83.         hookZoneTitle = 6;
  84.         hookZoneList = 7;
  85.         hookLine = 8;
  86.         hookVersion = 9;
  87.         hookReserved1 = 10;
  88.         hookReserved2 = 11;
  89.         hookReserved3 = 12;
  90.         hookReserved4 = 13;
  91. { Virtual items in the dialog item list }
  92.         hookNull = 100;
  93.         hookItemRefresh = 101;
  94.         hookZoneRefresh = 102;
  95.         hookEject = 103;
  96.         hookPreflight = 104;
  97.         hookPostflight = 105;
  98.         hookKeyBase = 1000;
  99.  
  100.     type
  101.         CTBUErr = OSErr;
  102.         DITLMethod = INTEGER;
  103.  
  104.         NLTypeEntry = record
  105.                 hIcon: Handle;
  106.                 typeStr: Str32;
  107.             end;
  108.  
  109.         NLType = array[0..3] of NLTypeEntry;
  110.  
  111.         NBPReply = record
  112.                 theEntity: EntityName;
  113.                 theAddr: AddrBlock;
  114.             end;
  115.  
  116.  
  117.     function InitCTBUtilities: CTBUErr;
  118.     function CTBGetCTBVersion: INTEGER;
  119.  
  120.     procedure AppendDITL (theDialog: DialogPtr; theDITL: Handle; method: DITLMethod);
  121.     function CountDITL (theDialog: DialogPtr): INTEGER;
  122.     procedure ShortenDITL (theDialog: DialogPtr; numberItems: INTEGER);
  123.  
  124.     function StandardNBP (where: Point; prompt: Str255; numTypes: INTEGER; typeList: NLType; nameFilter: ProcPtr; zoneFilter: ProcPtr; hookProc: ProcPtr; var theReply: NBPReply): INTEGER;
  125.  
  126.     function CustomNBP (where: Point; prompt: Str255; numTypes: INTEGER; typeList: NLType; nameFilter: ProcPtr; zoneFilter: ProcPtr; hookProc: ProcPtr; userData: LONGINT; dialogID: INTEGER; filterProc: ProcPtr; var theReply: NBPReply): INTEGER;
  127.  
  128. { Obsolete synonyms for above routines }
  129.  
  130.     function NuLookup (where: Point; prompt: Str255; numTypes: INTEGER; typeList: NLType; nameFilter: ProcPtr; zoneFilter: ProcPtr; hookProc: ProcPtr; var theReply: NBPReply): INTEGER;
  131.  
  132.     function NuPLookup (where: Point; prompt: Str255; numTypes: INTEGER; typeList: NLType; nameFilter: ProcPtr; zoneFilter: ProcPtr; hookProc: ProcPtr; userData: LONGINT; dialogID: INTEGER; filterProc: ProcPtr; var theReply: NBPReply): INTEGER;
  133.  
  134.  
  135.     { UsingCTBUtilities }
  136.  
  137.  
  138. implementation
  139. end.
  140.  
  141.